// pages/aboutme/index.js
import {
  storeBindingsBehavior
} from 'mobx-miniprogram-bindings'
import {
  store
} from '../store/index.js'

Component({
  behaviors:[storeBindingsBehavior], 
  storeBindings: {
    store,
    fields: {
      store,
      active: "active"
    },
    actions: {
      updateActive: 'updateActive'
    }
  },
  methods: {
    onChange(event) {
      this.updateActive(event.detail)
      wx.switchTab({
        url: `/pages/${event.detail}/index`,
      })
    },
  }
})